#ifndef GB_UTIL_H
#define GB_UTIL_H

#include <stdlib.h>

#define NEW(T) (T *)calloc(1, sizeof(T))
#define NEW_ARRAY(T, N) (T *)calloc(N, sizeof(T))
#define DELETE(x) if ((x)) { free((x)); (x) = 0; }
#define CHECK(x) if (!(x)) goto ERROR

#endif
